<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></meta>
<style>
	@page {
		size:A4 landscape;
	}
    /*.page{
    	page-break-after: always;
	} */
    table{
    	border-collapse:collapse;
    	word-break:break-all;
    	width:100%;
	    line-height: 30px;	   
    }
    td{
    	height:40px;
    	padding:5px 10px;
    }
    .key{
    	width:30%;
    	text-align:center;
    }
    .val{
    	width:70%;
    }
    .left{text-align:left}
    .right{text-align:right}
    .text-center{text-align:center;}
</style>
</head>
<body>
	<div class="page">
		<p class="text-center">
		   	<span><h2>${title}</h2></span>
		</p>
		<table border="0"  cellspacing=0>
			<tr>
			<td class="left"><span><h4>企业：${companyName}</h4></span> </td>
			<td class="right"><span><h4>申请日期：${startTime}</h4></span></td>
			</tr>
		</table>

		<table border="1" cellspacing=0>
			<tr>
				<td class="key"><span>发起人</span></td>
		        <td class="val"><span>${startUser}</span></td>
		    </tr>
	       	<tr>
		        <td class="key"><span>发起人部门</span></td>
		        <td class="val"><span>${startUserDept}</span></td>
		    </tr>
	       	<tr>
		        <td class="key"><span>发起内容</span></td>
		        <td class="val"><span>附件 1</span></td>
		    </tr>
		<#if approvalInfo?? && (approvalInfo?size > 1) >
			<#list approvalInfo as appro>
			<#if appro.formTitle == "">
				<#assign formTitle = "">
			<#else>
				<#assign formTitle = "附件 "+appro.formTitle+" | ">
			</#if>
			<#if appro_index==0>
				<tr>
					<td class="key" rowspan="${approvalInfo?size}">
						<span>审批人</span>
					</td>
					<td class="val text-left">
						<span>${(appro.nodeName)!""} | ${(appro.persionName)!""} | ${(appro.agreed)!""} | <b>${formTitle!""}</b></span><span style='color:#999999'>${(appro.time)!''}</span>
					</td>
				</tr>
			<#else>
				<tr>
					<td class="val text-left">
						 <span>${(appro.nodeName)!""} | ${(appro.persionName)!""} | ${(appro.agreed)!""} |<b> ${formTitle!""}</b></span><span style='color:#999999'>${(appro.time)!''}</span>
					</td>
				</tr>
			</#if>
			</#list>
		</#if>
		</table>
		<table border="0" cellspacing=0>
			<tr>
				<td class="left">
					<span><h4>打印人：${printPersion}</h4></span>
				</td>
				<td class="right">
					<span><h4>三维云办公</h4></span>
				</td>
			</tr>
		</table>
	</div>

<#if forms?? && (forms?size>0)>
	<#list forms as form>
		<#if (form.data?size>0)>
			<#list form.data as data>
				<#assign tab = data.tab>
				<#assign cols = data.cols>
				<#assign vals = data.data>
				<#assign formIndex = "附件 "+form.index>
				<#if (form.data?size > 1)>
					<#assign formIndex = formIndex+"-"+(data_index+1)>
				</#if>
				
				<div class="page">
					<p class="text-left"><span><h1>${formIndex}</h1></span></p>
					<p class="text-center"><span><h2>${(tab.tablename)!""}</h2></span></p>
					<table border="0" cellspacing=0>
						<tr>
						<td class="left"><span><h4>填表人：${(tab.username)!""}</h4></span> </td>
						<td class="right"><span><h4>填表时间：${(tab.dealtime)!(tab.starttime)}</h4></span></td>
						</tr>
					</table>	
					<#assign isMore = tab.ismore>
					<table border="1" cellspacing=0>
					<#if isMore == "1">
						<#if vals?? &&(vals?size>0)>
							<#assign val = (vals[0])!{"":""}>
						</#if>
						<#list cols as col>	
							<tr>
								<td class="key"><span>${col.colnamech}</span></td>
								<td class="val"><span>${(val[col.colname])!""}</span></td>
							</tr>
						</#list>
					<#else>
						<tr>
						<td class="text-center"><span>序号</span></td>
						<#list cols as col>
							<#if col.showtype != "hidden">
								<td class="text-center"><span>${(col.colnamech)!""}</span></td>
							</#if>
						</#list>
						</tr>
						<#list vals as val>
						<tr>
							<td class="text-center"><span>${val_index+1}</span></td>
							<#list cols as col>
								<#if col.showtype != "hidden">
									<#if val??>
										<td class="text-center"><span>${(val[col.colname])!""}</span></td>
									<#else>
										<td class="text-center"><span></span></td>
									</#if>
								</#if>
							</#list>
						</tr>
						</#list>
					</#if>
					</table>
				</div>
			</#list>
		</#if>
	</#list>
</#if>
</body>
</html>